<?php 
	$_event = new Event($_POST['eventID']);
?>
<ul class='hide eventDetails'>
	<li>
		<div class='div_header'>Pronostiquer la rencontre <?php echo $_event->getName(); ?></div>
		<div class='div_content'>
		<?php 
			$_bets = $_event->getBets();
			
			$currentType = null;
			foreach($_bets as $_bet){
				$_bet = new Bet($_bet->id);
				if($_bet->getType() != $currentType){
					echo "<p class='clear'>".$_bet->getTypeName()."</p>";
					$currentType = $_bet->getType();
				}
				?>
				<span 	class='tiptip button bet action' 
						title="<?php echo getTranslation("tooltips", "add_bet_to_ticket")?>" 
						action='addToTicket' 
						bet='<?php echo $_bet->getId(); ?>'>
						
						<?php echo $_bet->getTip(); ?>
						<span class='fr b'><?php echo $_bet->getQuote(); ?></span>
				</span>
				<?php
			}
		?>

			
		</div>
		<div class='div_header'>Partager la rencontre <?php echo $_event->getName(); ?></div>
		<div class='div_content'>
			<div class='fl'>
				<span class='fl action button follow yellow m_r_10 m_t_1 current' action='follow' objectType='event' objectID='1'>suivre cette rencontre</span>
			</div>
			<div class='fr'>			
				<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.weebeet.com?event&id=<?php echo $_event->getId(); ?>" data-text="Venez parier et suivre la rencontre <?php echo $_event->getName(); ?> sur" data-count="horizontal" data-via="weebeetcom" data-lang="fr">Tweeter</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
				<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.weebeet.com%2F%3Fevent%26id%3D<?php echo $_event->getId(); ?>&amp;send=false&amp;layout=button_count&amp;width=100&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=arial&amp;height=21&amp;appId=289416944405397" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
			</div>
			
			<div class='div_infoLine'>
				Pronostics Gagnants, JéromeF, JeffFanfan et 14 autres membres suivent cette rencontre
			</div>
		</div>
		
		<div class='div_header'>Commenter la rencontre <?php echo $_event->getName(); ?></div>
		<div class='div_content'>
			<div class='div_infoLine'>
				<div class='tiptip icon_20 commentBubble fl m_r_5' title='125 commentaires'></div>
				<span class='action grey ft_10' action='displayAllComments' publicationType='EVENT' publicationID='<?php echo $_event->getPublicationId(); ?>'>Afficher les XYZ commentaires</span>
			</div>
			<div id='publication_<?php echo $_event->getPublicationId(); ?>_comments' class='event'>
				<?php 
					$comment = $_event->getLastComment();
					if($comment != null) $comment->toHTML();
				?>
				
			</div>
			
			<div class='div_comment'>
				<div class='div_userPicture'>
					<img src="http://localhost/weebeet.com/wp-content/themes/toolbox/style/generic/images/users/default.png">
				</div>
				<div class='div_newcomment'>
					<textarea class='commentTextarea' placeholder='Rédiger votre commentaire ici...' targetType='EVENT' targetID='<?php echo $_event->getPublicationId(); ?>'></textarea>
				</div>
			</div>
		</div>
	</li>
</ul>